#coding=utf-8

i = 0; a = 0
for item in range(0,10):
    a = i
    if i == a:
        print("i = "+str(i))

    i = i + 1

i = 10; a = 0; b = 0
for item in range(10,100):
    a = i // 10
    b = i - a*10
    if i ==(a*a+b*b):
        print("i = "+str(i))
    
    i = i + 1

i = 100; a = 0; b = 0; c = 0

for item in range(100,1000):
    a = i // 100
    b = (i - a * 100) // 10
    c = i - a * 100 -b * 10
    if i == (a ** 3 + b ** 3 + c ** 3):
        print("i = " + str(i))

    i = i + 1

i = 1000; a = 0; b = 0; c = 0; d = 0

for item in range(1000,10000):
    a = i // 1000
    b = (i - a * 1000) // 100
    c = (i - a * 1000 - b * 100) // 10
    d = i % 10
    if i == (pow(a,4)+pow(b,4)+pow(c,4)+pow(d,4)):
        print("i = " + str(i))

    i = i + 1